package com.kaifa.test;

import java.util.Scanner;

public class WorkDemo4 {
    public static void main(String[] args) {
        System.out.println("请为电影《肖申克救赎》打分：");
        Scanner scan = new Scanner(System.in);
        int num = scan.nextInt();//打分
        if(num<1 || num>9){
            System.out.println("打分要求在1-9之间");
            num = scan.nextInt();
        }
        if(num>=1 && num<=9){
            System.out.print("电影得分：");
            for(int i=1;i<=num;i++){
                System.out.print("*");
            }
            scan.close();
        }

    }


}
